package routers

import (
	"github.com/astaxie/beego"
	"learn-web/controllers"
)

func init() {
	beego.Router("/", &controllers.BaseController{})

	beego.Router("/login", &controllers.LoginController{}, "*:Login")
	beego.Router("/logout", &controllers.LoginController{}, "*:Logout")

	beego.Router("/user/list", &controllers.UserController{}, "*:GetAllUser")
	beego.Router("/user/get", &controllers.UserController{}, "*:GetUser")
	beego.Router("/user/save", &controllers.UserController{}, "post:SaveUser")
	beego.Router("/user/delete", &controllers.UserController{}, "delete:DeleteUser")
	beego.Router("/user/otp/create", &controllers.UserController{}, "post:CreateOTP")
	beego.Router("/user/otp/check", &controllers.UserController{}, "post:CheckOTP")

	beego.Router("/log/list", &controllers.UserController{}, "*:GetAllLog")

	beego.Router("/api/validate", &controllers.ApiController{}, "get,post:Validate")
}
